package 字符流操作文件;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class Example10 {
     public static void main(String[] args) throws IOException {
		FileReader reader=new FileReader("example10.txt");
		//创建一个BufferedReader缓冲对象
		BufferedReader br=new BufferedReader(reader);
		FileWriter writer=new FileWriter("example10-des.txt");
		//创建一个BufferdWriter缓冲对象
		BufferedWriter bw=new BufferedWriter(writer);
		String str;
		while((str=br.readLine())!=null){
			bw.write(str);
			bw.newLine();
		}
		br.close();
		bw.close();
	}
}
